home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.8 KB | 86 lines | [TEXT/ToyS] |
- on run
- end run
-
- on idle
- set incr to random number from 2 to 9
- set dims to random number from 200 to 500
- set midP to round (dims / 2)
-
- set drawWin to ¬
- display drawing titled ¬
- "Moire 1.0" with dimensions {dims, dims}
-
- -- Set color
- draw into drawWin ¬
- using state {fg color:"991212"} ¬
-
- -- Across the top
- repeat with x from 0 to dims by incr
- draw a line into drawWin ¬
- inside of {midP, midP, x, 0}
- end repeat
-
- -- Set color, refresh
- draw into drawWin ¬
- using state {fg color:"129912"} ¬
- with refresh
-
- -- Down the right
- repeat with y from 0 to dims by incr
- draw a line into drawWin ¬
- inside of {midP, midP, dims, y}
- end repeat
-
- -- Set color, refresh
- draw into drawWin ¬
- using state {fg color:"121299"} ¬
- with refresh
-
- -- Across the bottom
- repeat with x from dims to 0 by -incr
- draw a line into drawWin ¬
- inside of {midP, midP, x, dims}
- end repeat
-
- -- Set color, refresh
- draw into drawWin ¬
- using state {fg color:"999912"} ¬
- with refresh
-
- -- Down the right
- repeat with y from dims to 0 by -incr
- draw a line into drawWin ¬
- inside of {midP, midP, 0, y}
- end repeat
-
- -- Refresh
- draw into drawWin with refresh
- pause for 3 with seconds timing
-
- -- Quadrants
- set myPic to capture picture from drawWin
- draw a picture into drawWin ¬
- using data myPic ¬
- with scale {-2, -2} ¬
- with a clear slate
- draw a picture into drawWin ¬
- using data myPic ¬
- with scale {-2, -2} ¬
- offset by {midP, 0}
- draw a picture into drawWin ¬
- using data myPic ¬
- with scale {-2, -2} ¬
- offset by {midP, midP}
- draw a picture into drawWin ¬
- using data myPic ¬
- with scale {-2, -2} ¬
- offset by {0, midP}
-
- draw into drawWin with refresh
- pause for 3 with seconds timing
-
- display drawing drawWin with disposal
-
- return 5
- end idle
-